let arr1:(number | string)[] = [1,2,3,'hello']

let arr2:number[] = [1,2,3]

let arr3:Array<number> = [1,1,1]

//元组允许表示一个已知元素数量与类型数组，各元素类型不必相同
let arr4:[number, string] = [1,'hello']
arr4[0] = 2;

